<template>
  <div class="heightP100">
        <div class="ky-div-container">
            <el-row class="marginT10">
                <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"  :current-page="pageConfig.pageNumber" :page-sizes="[10, 20, 30, 50]" :page-size="pageConfig.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="pageConfig.total" class="floatR">
                </el-pagination> -->
                <pagination v-show="pageConfig.total>0" :total="pageConfig.total" :page.sync="pageConfig.pageNumber" :limit.sync="pageConfig.pageSize" @pagination="getTableData" />
            </el-row>
        </div>
    </div>
</template>

<script>
import Pagination from "./pagination";
export default {
    components: { Pagination },
    data() {
        return {  
            pageConfig: {           //分页数据
                pageNumber: 1,      //当前页
                pageSize: 10,       //每页数量
                total: 0         //总条数
            },
        }
    },
    methods:{
        getTableData() {  //获取表格数据
            this.bTableLoading = true;
            this.$http.get( '/v1/tsbm/sta',
                {
                    size: this.pageConfig.pageSize,
                    page: this.pageConfig.pageNumber,
                }
            ).then((res) => {
                if (res.data.errorCode == '0') {
                    this.bTableLoading = false;
                    this.aTableData = res.data.result.stas;
                    this.pageConfig.total= res.data.result.total;
                }else{
                    this.bTableLoading = false;
                    this.aTableData = [];
                    this.errorCode(res.data)
                }
            }).catch(err => {
                
            });
        },
    },
    created(){
        this.getTableData();
    }
}
</script>

<style scoped>
.kyForm .el-form-item{
    margin-top: -10px !important;
    margin-bottom: 0px !important;
}
</style>